import 'package:flutter/material.dart';
import 'mvi_view_model.dart';

extension MviViewModelExtension<State, Event, Effect>
    on MVIViewModel<State, Event, Effect> {
  void handleSideEffect(BuildContext context, Function(Effect) onHandleEffect) {
    sideEffectFlow.listen((effect) {
      onHandleEffect.call(effect);
    });
  }
}
